<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Theory</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_Theory.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
></TD
><TD CLASS="topbut"
><A HREF="../doc/src/Theory.html"
>Source code</A
></TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Theory</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
><B
>Contents</B
></TD
></TR
><TR
><TD
><DL
><DT
><A HREF="#1"
>classes
</A
></DT
><DT
><A HREF="#2"
>types
</A
></DT
><DT
><A HREF="#3"
>WhiteKey
</A
></DT
><DT
><A HREF="#4"
>Accidental
</A
></DT
><DT
><A HREF="#5"
>PitchClass
</A
></DT
><DT
><A HREF="#6"
>Octave
</A
></DT
><DT
><A HREF="#7"
>Note
</A
></DT
><DT
><A HREF="#8"
>MidiNum
</A
></DT
><DT
><A HREF="#9"
>Chord
</A
></DT
><DT
><A HREF="#10"
>functions
</A
></DT
></DL
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
><P
>music theory in haskell
</P
><P
>goal: graph where nodes are legal chord voicings, arcs connect legal voice leadings, with cost = sum of the halfstep changes in each voice
</P
><P
>generalized to n halfsteps per octave, where rules like 'no parallels,' 'omittable fifth,' 'prepare/resolve dissonances,' 'no doubled dissonance,' etc determined by freq ratios (near 3:2, not near third/sixth, etc)
</P
><UL
><LI
> ghc, haddock, and cabal available as <A HREF="http://www.macports.org/"
>http://www.macports.org/</A
>
</LI
><LI
> haskell xcode plugin <A HREF="http://hoovy.org/HaskellXcodePlugin/"
>http://hoovy.org/HaskellXcodePlugin/</A
> (from 2007, doesn't work in xcode 3)
</LI
><LI
> generate html docs using <TT
>haddock -ho ../doc *.hs</TT
> <A HREF="http://haskell.org/haddock/"
>http://haskell.org/haddock/</A
>
</LI
><LI
> generate html docs with src using <TT
>./makeDoc</TT
> (requires HsColour <A HREF="http://hackage.haskell.org/package/hscolour"
>http://hackage.haskell.org/package/hscolour</A
>)
</LI
></UL
><P
>install hscolour with <TT
>cabal install hscolour</TT
> <A HREF="http://www.haskell.org/cabal/"
>http://www.haskell.org/cabal/</A
>
</P
><UL
><LI
> compile with <TT
>ghc -o ../theory --make Main -outputdir ../build</TT
>
</LI
></UL
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>  <A HREF="#t%3ASteppable"
>Steppable</A
> a  <SPAN CLASS="keyword"
>where</SPAN
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="#v%3AhalfStepsAbove"
>halfStepsAbove</A
> :: a -&gt; a -&gt; Int</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3AWhiteKey"
>WhiteKey</A
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3AC"
>C</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AD"
>D</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AE"
>E</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AF"
>F</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AG"
>G</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AA"
>A</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AB"
>B</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3AAccidental"
>Accidental</A
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3ADoubleFlat"
>DoubleFlat</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AFlat"
>Flat</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ANatural"
>Natural</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ASharp"
>Sharp</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ADoubleSharp"
>DoubleSharp</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3APitchClass"
>PitchClass</A
>  = <A HREF="#v%3APitchClass"
>PitchClass</A
> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="recfield"
><A HREF="#v%3AwhiteKey"
>whiteKey</A
> :: <A HREF="Theory.html#t%3AWhiteKey"
>WhiteKey</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Aaccidental"
>accidental</A
> :: <A HREF="Theory.html#t%3AAccidental"
>Accidental</A
></TD
></TR
></TABLE
>}</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>newtype</SPAN
>  <A HREF="#t%3AOctave"
>Octave</A
>  = <A HREF="#v%3AOctave"
>Octave</A
> Int</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aoctave"
>octave</A
> :: Int -&gt; <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3ANote"
>Note</A
>  = <A HREF="#v%3ANote"
>Note</A
> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="recfield"
><A HREF="#v%3ApitchClass"
>pitchClass</A
> :: <A HREF="Theory.html#t%3APitchClass"
>PitchClass</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Aoct"
>oct</A
> :: <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
></TR
></TABLE
>}</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>newtype</SPAN
>  <A HREF="#t%3AMidiNum"
>MidiNum</A
>  = <A HREF="#v%3AMidiNum"
>MidiNum</A
> Int</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmidiNum"
>midiNum</A
> :: Integral a =&gt; a -&gt; <A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>newtype</SPAN
>  <A HREF="#t%3AChord"
>Chord</A
>  = <A HREF="#v%3AChord"
>Chord</A
> [<A HREF="Theory.html#t%3ANote"
>Note</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Achord"
>chord</A
> :: [<A HREF="Theory.html#t%3ANote"
>Note</A
>] -&gt; <A HREF="Theory.html#t%3AChord"
>Chord</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmidiNumRef"
>midiNumRef</A
> :: (<A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
>, <A HREF="Theory.html#t%3ANote"
>Note</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmidiNums"
>midiNums</A
> :: <A HREF="Theory.html#t%3AChord"
>Chord</A
> -&gt; [<A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AhalfStepSeq"
>halfStepSeq</A
> :: <A HREF="Theory.html#t%3AChord"
>Chord</A
> -&gt; Maybe [Int]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afreq"
>freq</A
> :: <A HREF="Theory.html#t%3ANote"
>Note</A
> -&gt; Double</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AfreqRef"
>freqRef</A
> :: (Double, <A HREF="Theory.html#t%3ANote"
>Note</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afreqs"
>freqs</A
> :: <A HREF="Theory.html#t%3AChord"
>Chord</A
> -&gt; [Double]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmidiNumFromFreq"
>midiNumFromFreq</A
> :: Double -&gt; Double</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="1"
><A NAME="1"
>classes
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>class</SPAN
>  <A NAME="t:Steppable"
><A NAME="t%3ASteppable"
></A
></A
><B
>Steppable</B
> a  <SPAN CLASS="keyword"
>where</SPAN
></TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#Steppable"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>minimal complete definition:
 <TT
><A HREF="Theory.html#v%3AhalfStepsAbove"
>halfStepsAbove</A
></TT
>
</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="section4"
>Methods</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:halfStepsAbove"
><A NAME="v%3AhalfStepsAbove"
></A
></A
><B
>halfStepsAbove</B
></TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#halfStepsAbove"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: a</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>-&gt; a</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>-&gt; Int</TD
><TD CLASS="rdoc"
>number halfsteps <EM
>up</EM
> from the 1st to the 2nd arg
</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Steppable')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Steppable" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3ANote"
>Note</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3APitchClass"
>PitchClass</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3AAccidental"
>Accidental</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3AWhiteKey"
>WhiteKey</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="2"
><A NAME="2"
>types
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="3"
><A NAME="3"
>WhiteKey
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:WhiteKey"
><A NAME="t%3AWhiteKey"
></A
></A
><B
>WhiteKey</B
>  </TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#WhiteKey"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>first element determines octave breaks
</TD
></TR
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:C"
><A NAME="v%3AC"
></A
></A
><B
>C</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:D"
><A NAME="v%3AD"
></A
></A
><B
>D</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:E"
><A NAME="v%3AE"
></A
></A
><B
>E</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:F"
><A NAME="v%3AF"
></A
></A
><B
>F</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:G"
><A NAME="v%3AG"
></A
></A
><B
>G</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:A"
><A NAME="v%3AA"
></A
></A
><B
>A</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:B"
><A NAME="v%3AB"
></A
></A
><B
>B</B
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:WhiteKey')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:WhiteKey" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Bounded <A HREF="Theory.html#t%3AWhiteKey"
>WhiteKey</A
></TD
></TR
><TR
><TD CLASS="decl"
>Enum <A HREF="Theory.html#t%3AWhiteKey"
>WhiteKey</A
></TD
></TR
><TR
><TD CLASS="decl"
>Eq <A HREF="Theory.html#t%3AWhiteKey"
>WhiteKey</A
></TD
></TR
><TR
><TD CLASS="decl"
>Show <A HREF="Theory.html#t%3AWhiteKey"
>WhiteKey</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Cyc.html#t%3ACyc"
>Cyc</A
> <A HREF="Theory.html#t%3AWhiteKey"
>WhiteKey</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3AWhiteKey"
>WhiteKey</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Cyc.html#t%3AMetricCyc"
>MetricCyc</A
> Int <A HREF="Theory.html#t%3AWhiteKey"
>WhiteKey</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="4"
><A NAME="4"
>Accidental
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:Accidental"
><A NAME="t%3AAccidental"
></A
></A
><B
>Accidental</B
>  </TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#Accidental"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:DoubleFlat"
><A NAME="v%3ADoubleFlat"
></A
></A
><B
>DoubleFlat</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:Flat"
><A NAME="v%3AFlat"
></A
></A
><B
>Flat</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:Natural"
><A NAME="v%3ANatural"
></A
></A
><B
>Natural</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:Sharp"
><A NAME="v%3ASharp"
></A
></A
><B
>Sharp</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:DoubleSharp"
><A NAME="v%3ADoubleSharp"
></A
></A
><B
>DoubleSharp</B
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Accidental')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Accidental" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Bounded <A HREF="Theory.html#t%3AAccidental"
>Accidental</A
></TD
></TR
><TR
><TD CLASS="decl"
>Enum <A HREF="Theory.html#t%3AAccidental"
>Accidental</A
></TD
></TR
><TR
><TD CLASS="decl"
>Eq <A HREF="Theory.html#t%3AAccidental"
>Accidental</A
></TD
></TR
><TR
><TD CLASS="decl"
>Ord <A HREF="Theory.html#t%3AAccidental"
>Accidental</A
></TD
></TR
><TR
><TD CLASS="decl"
>Show <A HREF="Theory.html#t%3AAccidental"
>Accidental</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3AAccidental"
>Accidental</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="5"
><A NAME="5"
>PitchClass
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:PitchClass"
><A NAME="t%3APitchClass"
></A
></A
><B
>PitchClass</B
>  </TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#PitchClass"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:PitchClass"
><A NAME="v%3APitchClass"
></A
></A
><B
>PitchClass</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="body" COLSPAN="2"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:whiteKey"
><A NAME="v%3AwhiteKey"
></A
></A
><B
>whiteKey</B
> :: <A HREF="Theory.html#t%3AWhiteKey"
>WhiteKey</A
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:accidental"
><A NAME="v%3Aaccidental"
></A
></A
><B
>accidental</B
> :: <A HREF="Theory.html#t%3AAccidental"
>Accidental</A
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:PitchClass')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:PitchClass" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Bounded <A HREF="Theory.html#t%3APitchClass"
>PitchClass</A
></TD
></TR
><TR
><TD CLASS="decl"
>Enum <A HREF="Theory.html#t%3APitchClass"
>PitchClass</A
></TD
></TR
><TR
><TD CLASS="decl"
>Eq <A HREF="Theory.html#t%3APitchClass"
>PitchClass</A
></TD
></TR
><TR
><TD CLASS="decl"
>Show <A HREF="Theory.html#t%3APitchClass"
>PitchClass</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Cyc.html#t%3ACyc"
>Cyc</A
> <A HREF="Theory.html#t%3APitchClass"
>PitchClass</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3APitchClass"
>PitchClass</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Cyc.html#t%3AMetricCyc"
>MetricCyc</A
> Int <A HREF="Theory.html#t%3APitchClass"
>PitchClass</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="6"
><A NAME="6"
>Octave
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>newtype</SPAN
>  <A NAME="t:Octave"
><A NAME="t%3AOctave"
></A
></A
><B
>Octave</B
>  </TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#Octave"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:Octave"
><A NAME="v%3AOctave"
></A
></A
><B
>Octave</B
> Int</TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Octave')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Octave" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Enum <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
></TR
><TR
><TD CLASS="decl"
>Eq <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
></TR
><TR
><TD CLASS="decl"
>Integral <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
></TR
><TR
><TD CLASS="decl"
>Num <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
></TR
><TR
><TD CLASS="decl"
>Ord <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
></TR
><TR
><TD CLASS="decl"
>Real <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
></TR
><TR
><TD CLASS="decl"
>Show <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:octave"
><A NAME="v%3Aoctave"
></A
></A
><B
>octave</B
> :: Int -&gt; <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#octave"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><TT
><A HREF="Theory.html#t%3AOctave"
>Octave</A
></TT
> constructor
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="7"
><A NAME="7"
>Note
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:Note"
><A NAME="t%3ANote"
></A
></A
><B
>Note</B
>  </TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#Note"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:Note"
><A NAME="v%3ANote"
></A
></A
><B
>Note</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="body" COLSPAN="2"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:pitchClass"
><A NAME="v%3ApitchClass"
></A
></A
><B
>pitchClass</B
> :: <A HREF="Theory.html#t%3APitchClass"
>PitchClass</A
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:oct"
><A NAME="v%3Aoct"
></A
></A
><B
>oct</B
> :: <A HREF="Theory.html#t%3AOctave"
>Octave</A
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Note')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Note" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Enum <A HREF="Theory.html#t%3ANote"
>Note</A
></TD
></TR
><TR
><TD CLASS="decl"
>Eq <A HREF="Theory.html#t%3ANote"
>Note</A
></TD
></TR
><TR
><TD CLASS="decl"
>Integral <A HREF="Theory.html#t%3ANote"
>Note</A
></TD
></TR
><TR
><TD CLASS="decl"
>Num <A HREF="Theory.html#t%3ANote"
>Note</A
></TD
></TR
><TR
><TD CLASS="decl"
>Ord <A HREF="Theory.html#t%3ANote"
>Note</A
></TD
></TR
><TR
><TD CLASS="decl"
>Real <A HREF="Theory.html#t%3ANote"
>Note</A
></TD
></TR
><TR
><TD CLASS="decl"
>Show <A HREF="Theory.html#t%3ANote"
>Note</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3ANote"
>Note</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="8"
><A NAME="8"
>MidiNum
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>newtype</SPAN
>  <A NAME="t:MidiNum"
><A NAME="t%3AMidiNum"
></A
></A
><B
>MidiNum</B
>  </TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#MidiNum"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:MidiNum"
><A NAME="v%3AMidiNum"
></A
></A
><B
>MidiNum</B
> Int</TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:MidiNum')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:MidiNum" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Enum <A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TD
></TR
><TR
><TD CLASS="decl"
>Eq <A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TD
></TR
><TR
><TD CLASS="decl"
>Integral <A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TD
></TR
><TR
><TD CLASS="decl"
>Num <A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TD
></TR
><TR
><TD CLASS="decl"
>Ord <A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TD
></TR
><TR
><TD CLASS="decl"
>Real <A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TD
></TR
><TR
><TD CLASS="decl"
>Show <A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Theory.html#t%3ASteppable"
>Steppable</A
> <A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:midiNum"
><A NAME="v%3AmidiNum"
></A
></A
><B
>midiNum</B
> :: Integral a =&gt; a -&gt; <A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#midiNum"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><TT
><A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TT
> constructor
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="9"
><A NAME="9"
>Chord
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>newtype</SPAN
>  <A NAME="t:Chord"
><A NAME="t%3AChord"
></A
></A
><B
>Chord</B
>  </TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#Chord"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:Chord"
><A NAME="v%3AChord"
></A
></A
><B
>Chord</B
> [<A HREF="Theory.html#t%3ANote"
>Note</A
>]</TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Chord')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Chord" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Eq <A HREF="Theory.html#t%3AChord"
>Chord</A
></TD
></TR
><TR
><TD CLASS="decl"
>Show <A HREF="Theory.html#t%3AChord"
>Chord</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:chord"
><A NAME="v%3Achord"
></A
></A
><B
>chord</B
> :: [<A HREF="Theory.html#t%3ANote"
>Note</A
>] -&gt; <A HREF="Theory.html#t%3AChord"
>Chord</A
></TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#chord"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><TT
><A HREF="Theory.html#t%3AChord"
>Chord</A
></TT
> constructor
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="10"
><A NAME="10"
>functions
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:midiNumRef"
><A NAME="v%3AmidiNumRef"
></A
></A
><B
>midiNumRef</B
> :: (<A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
>, <A HREF="Theory.html#t%3ANote"
>Note</A
>)</TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#midiNumRef"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:midiNums"
><A NAME="v%3AmidiNums"
></A
></A
><B
>midiNums</B
> :: <A HREF="Theory.html#t%3AChord"
>Chord</A
> -&gt; [<A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
>]</TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#midiNums"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>self explanatory
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:halfStepSeq"
><A NAME="v%3AhalfStepSeq"
></A
></A
><B
>halfStepSeq</B
></TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#halfStepSeq"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="Theory.html#t%3AChord"
>Chord</A
></TD
><TD CLASS="rdoc"
>length &gt;= 2 
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; Maybe [Int]</TD
><TD CLASS="rdoc"
><TT
>Nothing</TT
> iff applied to <TT
><A HREF="Theory.html#t%3AChord"
>Chord</A
></TT
> with less than 2 <TT
><A HREF="Theory.html#t%3ANote"
>Note</A
></TT
>s, otherwise, for a <TT
><A HREF="Theory.html#t%3AChord"
>Chord</A
></TT
> with n <TT
><A HREF="Theory.html#t%3ANote"
>Note</A
></TT
>s, <TT
>Just</TT
> a list of n-1 numbers of halfsteps that separate the <TT
><A HREF="Theory.html#t%3ANote"
>Note</A
></TT
>s, in the order they appeared
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>intervalic pattern
  ex: <TT
>halfStepSeq [Note(PitchClass C Natural) 3,Note(PitchClass E Flat) 3,Note(PitchClass G Flat) 3,Note(PitchClass B Flat) 3] = [3,3,4]</TT
> (a halfdiminished 7)
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:freq"
><A NAME="v%3Afreq"
></A
></A
><B
>freq</B
> :: <A HREF="Theory.html#t%3ANote"
>Note</A
> -&gt; Double</TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#freq"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>frequncy for a <TT
><A HREF="Theory.html#t%3ANote"
>Note</A
></TT
> in Hz, assumes nTET
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:freqRef"
><A NAME="v%3AfreqRef"
></A
></A
><B
>freqRef</B
> :: (Double, <A HREF="Theory.html#t%3ANote"
>Note</A
>)</TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#freqRef"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:freqs"
><A NAME="v%3Afreqs"
></A
></A
><B
>freqs</B
> :: <A HREF="Theory.html#t%3AChord"
>Chord</A
> -&gt; [Double]</TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#freqs"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>self explanatory
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:midiNumFromFreq"
><A NAME="v%3AmidiNumFromFreq"
></A
></A
><B
>midiNumFromFreq</B
> :: Double -&gt; Double</TD
><TD CLASS="declbut"
><A HREF="../doc/src/Theory.html#midiNumFromFreq"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>self explanatory
  we don't use the Integral <TT
><A HREF="Theory.html#t%3AMidiNum"
>MidiNum</A
></TT
> type because we want to express fractional notes
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.4.2</TD
></TR
></TABLE
></BODY
></HTML
>
